package com.baizhi.cmfz.restController;

import com.baizhi.cmfz.entity.Article;
import com.baizhi.cmfz.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RequestMapping("/article")
@RestController
public class RestArticleController {

    @Autowired
    private ArticleService articleService;

    @GetMapping("/showSix/{count}")
    @ResponseBody
    public List<Article> showSix(@PathVariable int count){
        System.out.println(count);
        return articleService.showSix(count);
    }
}
